<?php

use Illuminate\Http\Request;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
 */

Route::middleware('auth:api')->get('/user', function (Request $request) {
	return $request->user();
});
Route::get('/test', function () {
	$cateJson = '../resources/json/cart.json';
	$json = file_get_contents($cateJson);
// 	$a = '{
	//     "inStockCount": 3,
	//     "paging": {
	//         "next": "https://www.duozhuayu.com/api/user/cart?stock_step=&step=no_stock&limit=10&after_id=1576035021412"
	//     },
	//       "data": [],

//     "noStockCount": 496
	// }';
	return $json;

});

Route::any('wechat', 'WechatController@server');

Route::get('/check_dzy', 'CheckController@duozhuayu');


Route::get('/test', function () {
        $cateJson = '../resources/json/cart.json';
        $json = file_get_contents($cateJson);
        return $json;

});

Route::any('wechat','WechatController@server');

Route::get('/dzy_token/{user_id}','CheckController@token');




